/**
 * Copyright 2012 Fonfon.Fenceer
 * All rights reserved.
 * 
 * @project 
 * @author Fonfon.Fenceer
 * @version 1.0
 * @data 2012-3-14
 */
package com.guidecaptain.java.action;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.guidecaptain.core.base.action.BaseAction;
import com.guidecaptain.java.model.vo.CardVO;
import com.guidecaptain.java.service.CardService;

/**
 * 
 * @author fenceer
 */
@Controller
@Scope("prototype")
public class CardAction extends BaseAction {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Autowired
	private CardService cardService;

	private CardVO cardVO = new CardVO();
	
	/**
	 * 添加证件
	 * @return
	 */
	public String insertCard() {
		this.cardService.insertCard(cardVO);
		return SUCCESS;
	}

	/**
	 * 获得证件列表，返回添加证件页面
	 * 
	 * @return
	 */
	public String insertCertificate() {
		cardVO.setCardList(cardService.queryCardList());

		return "insertGuidectf";// 返回到添加页面
	}

	/**
	 * @param
	 * @return
	 */
	@Override
	public Object getModel() {

		return cardVO;
	}

}
